/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
// -*- coding:iso-8859-15 mode: c++ -*-
/** 
 * \file
 * \brief Question dialog header.
 * \author Antti Maula <antti.maula@tkk.fi>
 * \author wxFormBuilder (Autogenerated base code)
 *
 * $Id: MaCI_AlarmQuestionDialog.h,v 1.2 2009-04-27 09:23:05 amaula Exp $
 *
 */
#ifndef __MaCI_AlarmQuestionDialog__
#define __MaCI_AlarmQuestionDialog__

#include <wx/timer.h>
#include "MaCI_Alarm_GUI.h"
#include "MaCI_AlarmDataTypes.hpp"
#include "ownutils.h"
#include <string>

/** Implementing QuestionDialog */
class MaCI_AlarmQuestionDialog : public QuestionDialog, 
                                 public wxTimer
{ 
 public:
  /** Constructor */
  MaCI_AlarmQuestionDialog( wxWindow* parent );
  
  void SetQuestion(const std::string &aSource, 
                   const std::string &aMessage,
                   const unsigned int aTimeout_ms);

  void SetAlarmInfoPtr(SAlarmInfo *aData);

 protected:
  void OnCloseButtonClick( wxCloseEvent& event );
  void OnYesButtonClick( wxCommandEvent& event );
  void OnNoButtonClick( wxCommandEvent& event );
  
  void Notify(); ///< Timer hit!

 private:
  unsigned int iTimeout_ms;
  ownTime_ms_t iTimeout_begin;
  wxTimer iTimer;
  SAlarmInfo *iAlarmInfoPtr;
};

#endif // __MaCI_AlarmQuestionDialog__
